package movee.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.SchemaProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import movee.domain.common.BaseBackupConfig;

import java.sql.Timestamp;

/**
 *
 *
 * @author movee
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@Schema(description = "备份系统配置信息")
public class BackupConfigDto extends BaseBackupConfig {

    /**
     * 业务域
     */
    @SchemaProperty(name = "业务域")
    private String domain;

    @SchemaProperty(name = "管理ip")
    private String mgmtIp = "";

    /**
     * 创建人
     */
    @SchemaProperty(name = "创建人")
    private String createUser;

    /**
     * 最后修改人
     */
    @SchemaProperty(name = "最后修改人")
    private String updateUser;

    /**
     * 创建时间
     */
    // @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    // @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @SchemaProperty(name = "创建时间")
    private Timestamp createTime;

    /**
     * 最后更新时间
     */
    // @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    // @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @SchemaProperty(name = "最后修改时间")
    private Timestamp updateTime;

}
